Exported Functions ¶
Initialization and deinitialization functions ¶
- group PCD_Exported_Functions_Group1
-
This subsection provides a set of functions allowing to initialize and deinitialize the PCD.
Call the function HAL_PCD_Init() to initialize the selected PCD handle and associate an instance.
Call the function HAL_PCD_DeInit() to de-initialize the given HAL PCD instance by resetting the state machine.
Functions
-
hal_status_t
HAL_PCD_Init
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_t
instance
)
¶
-
Initializes the PCD according to the specified parameters in the hal_pcd_handle_t and initialize the associated instance.
- Parameters :
-
hpcd – PCD handler
instance – PCD instance
- Return values :
-
HAL – status
-
void
HAL_PCD_DeInit
(
hal_pcd_handle_t
*
hpcd
)
¶
-
DeInitializes the PCD peripheral.
- Parameters :
-
hpcd – PCD handler
- group PCD_Exported_Functions_Group1
-
This subsection provides a set of functions allowing to initialize and deinitialize the PCD.
Call the function HAL_PCD_Init() to initialize the selected PCD handle and associate an instance.
Call the function HAL_PCD_DeInit() to de-initialize the given HAL PCD instance by resetting the state machine.
Functions
-
hal_status_t
HAL_PCD_Init
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_t
instance
)
-
Initializes the PCD according to the specified parameters in the hal_pcd_handle_t and initialize the associated instance.
- Parameters :
-
hpcd – PCD handler
instance – PCD instance
- Return values :
-
HAL – status
-
void
HAL_PCD_DeInit
(
hal_pcd_handle_t
*
hpcd
)
-
DeInitializes the PCD peripheral.
- Parameters :
-
hpcd – PCD handler
- group PCD_Exported_Functions_Group1
-
This subsection provides a set of functions allowing to initialize and deinitialize the PCD.
Call the function HAL_PCD_Init() to initialize the selected PCD handle and associate an instance.
Call the function HAL_PCD_DeInit() to de-initialize the given HAL PCD instance by resetting the state machine.
Functions
-
hal_status_t
HAL_PCD_Init
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_t
instance
)
-
Initializes the PCD according to the specified parameters in the hal_pcd_handle_t and initialize the associated instance.
- Parameters :
-
hpcd – PCD handler
instance – PCD instance
- Return values :
-
HAL – status
-
void
HAL_PCD_DeInit
(
hal_pcd_handle_t
*
hpcd
)
-
DeInitializes the PCD peripheral.
- Parameters :
-
hpcd – PCD handler
Global Configuration functions ¶
- group PCD_Exported_Functions_Group2
-
This subsection provides functions allowing to configure the USB in Device mode:
Call HAL_PCD_SetConfig() to configure the initialized instance with a set of parameters containing: phy_interface endpoints_nbr core_speed bulk_db_state iso_db_state
Functions
-
hal_status_t
HAL_PCD_SetConfig
(
hal_pcd_handle_t
*
hpcd
,
const
hal_pcd_config_t
*
p_config
)
¶
-
Configure the PCD according to the specified parameters in the hal_pcd_handle_t and initialize the associated handle.
- Parameters :
-
hpcd – PCD handler
p_config – pointer to the peripheral configuration structure
- Return values :
-
HAL – status
- group PCD_Exported_Functions_Group2
-
This subsection provides functions allowing to configure the USB in Device mode:
Call HAL_PCD_SetConfig() to configure the initialized instance with a set of parameters containing: phy_interface endpoints_nbr core_speed bulk_db_state iso_db_state
Functions
-
hal_status_t
HAL_PCD_SetConfig
(
hal_pcd_handle_t
*
hpcd
,
const
hal_pcd_config_t
*
p_config
)
-
Configure the PCD according to the specified parameters in the hal_pcd_handle_t and initialize the associated handle.
- Parameters :
-
hpcd – PCD handler
p_config – pointer to the peripheral configuration structure
- Return values :
-
HAL – status
- group PCD_Exported_Functions_Group2
-
This subsection provides functions allowing to configure the USB in Device mode:
Call HAL_PCD_SetConfig() to configure the initialized instance with a set of parameters containing: phy_interface endpoints_nbr core_speed bulk_db_state iso_db_state
Functions
-
hal_status_t
HAL_PCD_SetConfig
(
hal_pcd_handle_t
*
hpcd
,
const
hal_pcd_config_t
*
p_config
)
-
Configure the PCD according to the specified parameters in the hal_pcd_handle_t and initialize the associated handle.
- Parameters :
-
hpcd – PCD handler
p_config – pointer to the peripheral configuration structure
- Return values :
-
HAL – status
User Data functions ¶
- group PCD_Exported_Functions_Group3
-
A set of functions allowing to manage a user data pointer stored to the PCD handle:
HAL_PCD_SetUserData() Set the user data into the handle
HAL_PCD_GetUserData() Get the user data from the handle
Functions
-
void
HAL_PCD_SetUserData
(
hal_pcd_handle_t
*
hpcd
,
const
void
*
p_user_data
)
¶
-
Set the user data pointer into the handle.
- Parameters :
-
hpcd – Pointer to a hal_pcd_handle_t
p_user_data – Pointer to the user data.
-
const
void
*
HAL_PCD_GetUserData
(
const
hal_pcd_handle_t
*
hpcd
)
¶
-
Get the user data pointer from the handle.
- Parameters :
-
hpcd – Pointer to a hal_pcd_handle_t
- Return values :
-
Pointer – to the user data.
-
uint32_t
HAL_PCD_GetLastErrorCodes
(
const
hal_pcd_handle_t
*
hpcd
)
¶
-
Get Last Error codes.
- Parameters :
-
hpcd – Pointer to a hal_pcd_handle_t
- Return values :
-
last – error code.
- group PCD_Exported_Functions_Group3
-
A set of functions allowing to manage a user data pointer stored to the PCD handle:
HAL_PCD_SetUserData() Set the user data into the handle
HAL_PCD_GetUserData() Get the user data from the handle
Functions
-
void
HAL_PCD_SetUserData
(
hal_pcd_handle_t
*
hpcd
,
const
void
*
p_user_data
)
-
Set the user data pointer into the handle.
- Parameters :
-
hpcd – Pointer to a hal_pcd_handle_t
p_user_data – Pointer to the user data.
-
const
void
*
HAL_PCD_GetUserData
(
const
hal_pcd_handle_t
*
hpcd
)
-
Get the user data pointer from the handle.
- Parameters :
-
hpcd – Pointer to a hal_pcd_handle_t
- Return values :
-
Pointer – to the user data.
-
uint32_t
HAL_PCD_GetLastErrorCodes
(
const
hal_pcd_handle_t
*
hpcd
)
-
Get Last Error codes.
- Parameters :
-
hpcd – Pointer to a hal_pcd_handle_t
- Return values :
-
last – error code.
- group PCD_Exported_Functions_Group3
-
A set of functions allowing to manage a user data pointer stored to the PCD handle:
HAL_PCD_SetUserData() Set the user data into the handle
HAL_PCD_GetUserData() Get the user data from the handle
Functions
-
void
HAL_PCD_SetUserData
(
hal_pcd_handle_t
*
hpcd
,
const
void
*
p_user_data
)
-
Set the user data pointer into the handle.
- Parameters :
-
hpcd – Pointer to a hal_pcd_handle_t
p_user_data – Pointer to the user data.
-
const
void
*
HAL_PCD_GetUserData
(
const
hal_pcd_handle_t
*
hpcd
)
-
Get the user data pointer from the handle.
- Parameters :
-
hpcd – Pointer to a hal_pcd_handle_t
- Return values :
-
Pointer – to the user data.
-
uint32_t
HAL_PCD_GetLastErrorCodes
(
const
hal_pcd_handle_t
*
hpcd
)
-
Get Last Error codes.
- Parameters :
-
hpcd – Pointer to a hal_pcd_handle_t
- Return values :
-
last – error code.
Peripheral Control functions ¶
- group PCD_Exported_Functions_Group4
-
Functions
-
hal_status_t
HAL_PCD_Start
(
hal_pcd_handle_t
*
hpcd
)
¶
-
Start the USB device.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_Stop
(
hal_pcd_handle_t
*
hpcd
)
¶
-
Stop the USB device.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_LPM_Start
(
hal_pcd_handle_t
*
hpcd
)
¶
-
Start LPM (low Power Management) feature.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_LPM_Stop
(
hal_pcd_handle_t
*
hpcd
)
¶
-
Stop LPM (low Power Management) feature.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_BCD_Start
(
hal_pcd_handle_t
*
hpcd
)
¶
-
Start Battery Charging feature.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_BCD_Stop
(
hal_pcd_handle_t
*
hpcd
)
¶
-
Stop Battery Charging feature.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_BCD_PortTypeDetection
(
hal_pcd_handle_t
*
hpcd
)
¶
-
Port Type Detection Process.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_DeviceConnect
(
const
hal_pcd_handle_t
*
hpcd
)
¶
-
Connect the USB device.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_DeviceDisconnect
(
const
hal_pcd_handle_t
*
hpcd
)
¶
-
Disconnect the USB device.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_SetDeviceAddress
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
address
)
¶
-
Set the USB Device address.
- Parameters :
-
hpcd – PCD handle
address – new device address
- Return values :
-
HAL – status
-
hal_pcd_device_speed_t
HAL_PCD_GetDeviceSpeed
(
const
hal_pcd_handle_t
*
hpcd
)
¶
-
Get the USB Device speed.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_OpenEndpoint
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
,
uint16_t
ep_mps
,
hal_pcd_ep_type_t
ep_type
)
¶
-
Open and configure an endpoint.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
ep_mps – endpoint max packet size
ep_type – endpoint type
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_CloseEndpoint
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
)
¶
-
Deactivate an endpoint.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_SetEndpointReceive
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
,
uint8_t
*
p_buffer
,
uint32_t
size_byte
)
¶
-
Receive an amount of data.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
p_buffer – pointer to the reception buffer
size_byte – amount of data to be received
- Return values :
-
HAL – status
-
uint32_t
HAL_PCD_EP_GetRxCount
(
const
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
)
¶
-
Get Received Data Size.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
- Return values :
-
Data – Size
-
hal_status_t
HAL_PCD_SetEndpointTransmit
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
,
uint8_t
*
p_buffer
,
uint32_t
size_byte
)
¶
-
Send an amount of data.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
p_buffer – pointer to the transmission buffer
size_byte – amount of data to be sent
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_SetEndpointStall
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
)
¶
-
Set a STALL condition over an endpoint.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_ClearEndpointStall
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
)
¶
-
Clear a STALL condition over an endpoint.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_AbortEndpointTransfer
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
)
¶
-
Abort an USB endpoint transaction.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_FlushEndpoint
(
const
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
)
¶
-
Flush an endpoint.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RemoteWakeup_Start
(
const
hal_pcd_handle_t
*
hpcd
)
¶
-
Start remote wakeup signalling.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RemoteWakeup_Stop
(
const
hal_pcd_handle_t
*
hpcd
)
¶
-
Stop remote wakeup signalling.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_PMAConfig
(
hal_pcd_handle_t
*
hpcd
,
uint16_t
ep_addr
,
uint16_t
ep_kind
,
uint32_t
pma_address
)
¶
-
Configure PMA for endpoints.
- Parameters :
-
hpcd – Device instance
ep_addr – endpoint address
ep_kind – endpoint Kind HAL_PCD_SNG_BUF: Single Buffer used HAL_PCD_DBL_BUF: Double Buffer used
pma_address – endpoint buffer address in The PMA: In case of single buffer endpoint this parameter is 16-bit value providing the address of endpoint buffer in PMA. In case of double buffer endpoint this parameter is a 32-bit value providing the endpoint buffer 0 address in the LSB part of 32-bit value and endpoint buffer 1 address in the MSB part of 32-bit value.
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_Start
(
hal_pcd_handle_t
*
hpcd
)
¶
- group PCD_Exported_Functions_Group4
-
Functions
-
hal_status_t
HAL_PCD_Start
(
hal_pcd_handle_t
*
hpcd
)
-
Start the USB device.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_Stop
(
hal_pcd_handle_t
*
hpcd
)
-
Stop the USB device.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_LPM_Start
(
hal_pcd_handle_t
*
hpcd
)
-
Start LPM (low Power Management) feature.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_LPM_Stop
(
hal_pcd_handle_t
*
hpcd
)
-
Stop LPM (low Power Management) feature.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_BCD_Start
(
hal_pcd_handle_t
*
hpcd
)
-
Start Battery Charging feature.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_BCD_Stop
(
hal_pcd_handle_t
*
hpcd
)
-
Stop Battery Charging feature.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_BCD_PortTypeDetection
(
hal_pcd_handle_t
*
hpcd
)
-
Port Type Detection Process.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_DeviceConnect
(
const
hal_pcd_handle_t
*
hpcd
)
-
Connect the USB device.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_DeviceDisconnect
(
const
hal_pcd_handle_t
*
hpcd
)
-
Disconnect the USB device.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_SetDeviceAddress
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
address
)
-
Set the USB Device address.
- Parameters :
-
hpcd – PCD handle
address – new device address
- Return values :
-
HAL – status
-
hal_pcd_device_speed_t
HAL_PCD_GetDeviceSpeed
(
const
hal_pcd_handle_t
*
hpcd
)
-
Get the USB Device speed.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_OpenEndpoint
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
,
uint16_t
ep_mps
,
hal_pcd_ep_type_t
ep_type
)
-
Open and configure an endpoint.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
ep_mps – endpoint max packet size
ep_type – endpoint type
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_CloseEndpoint
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
)
-
Deactivate an endpoint.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_SetEndpointReceive
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
,
uint8_t
*
p_buffer
,
uint32_t
size_byte
)
-
Receive an amount of data.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
p_buffer – pointer to the reception buffer
size_byte – amount of data to be received
- Return values :
-
HAL – status
-
uint32_t
HAL_PCD_EP_GetRxCount
(
const
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
)
-
Get Received Data Size.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
- Return values :
-
Data – Size
-
hal_status_t
HAL_PCD_SetEndpointTransmit
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
,
uint8_t
*
p_buffer
,
uint32_t
size_byte
)
-
Send an amount of data.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
p_buffer – pointer to the transmission buffer
size_byte – amount of data to be sent
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_SetEndpointStall
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
)
-
Set a STALL condition over an endpoint.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_ClearEndpointStall
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
)
-
Clear a STALL condition over an endpoint.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_AbortEndpointTransfer
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
)
-
Abort an USB endpoint transaction.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_FlushEndpoint
(
const
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
)
-
Flush an endpoint.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RemoteWakeup_Start
(
const
hal_pcd_handle_t
*
hpcd
)
-
Start remote wakeup signalling.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RemoteWakeup_Stop
(
const
hal_pcd_handle_t
*
hpcd
)
-
Stop remote wakeup signalling.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_PMAConfig
(
hal_pcd_handle_t
*
hpcd
,
uint16_t
ep_addr
,
uint16_t
ep_kind
,
uint32_t
pma_address
)
-
Configure PMA for endpoints.
- Parameters :
-
hpcd – Device instance
ep_addr – endpoint address
ep_kind – endpoint Kind HAL_PCD_SNG_BUF: Single Buffer used HAL_PCD_DBL_BUF: Double Buffer used
pma_address – endpoint buffer address in The PMA: In case of single buffer endpoint this parameter is 16-bit value providing the address of endpoint buffer in PMA. In case of double buffer endpoint this parameter is a 32-bit value providing the endpoint buffer 0 address in the LSB part of 32-bit value and endpoint buffer 1 address in the MSB part of 32-bit value.
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_Start
(
hal_pcd_handle_t
*
hpcd
)
- group PCD_Exported_Functions_Group4
-
Functions
-
hal_status_t
HAL_PCD_Start
(
hal_pcd_handle_t
*
hpcd
)
-
Start the USB device.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_Stop
(
hal_pcd_handle_t
*
hpcd
)
-
Stop the USB device.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_LPM_Start
(
hal_pcd_handle_t
*
hpcd
)
-
Start LPM (low Power Management) feature.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_LPM_Stop
(
hal_pcd_handle_t
*
hpcd
)
-
Stop LPM (low Power Management) feature.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_BCD_Start
(
hal_pcd_handle_t
*
hpcd
)
-
Start Battery Charging feature.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_BCD_Stop
(
hal_pcd_handle_t
*
hpcd
)
-
Stop Battery Charging feature.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_BCD_PortTypeDetection
(
hal_pcd_handle_t
*
hpcd
)
-
Port Type Detection Process.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_DeviceConnect
(
const
hal_pcd_handle_t
*
hpcd
)
-
Connect the USB device.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_DeviceDisconnect
(
const
hal_pcd_handle_t
*
hpcd
)
-
Disconnect the USB device.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_SetDeviceAddress
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
address
)
-
Set the USB Device address.
- Parameters :
-
hpcd – PCD handle
address – new device address
- Return values :
-
HAL – status
-
hal_pcd_device_speed_t
HAL_PCD_GetDeviceSpeed
(
const
hal_pcd_handle_t
*
hpcd
)
-
Get the USB Device speed.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_OpenEndpoint
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
,
uint16_t
ep_mps
,
hal_pcd_ep_type_t
ep_type
)
-
Open and configure an endpoint.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
ep_mps – endpoint max packet size
ep_type – endpoint type
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_CloseEndpoint
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
)
-
Deactivate an endpoint.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_SetEndpointReceive
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
,
uint8_t
*
p_buffer
,
uint32_t
size_byte
)
-
Receive an amount of data.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
p_buffer – pointer to the reception buffer
size_byte – amount of data to be received
- Return values :
-
HAL – status
-
uint32_t
HAL_PCD_EP_GetRxCount
(
const
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
)
-
Get Received Data Size.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
- Return values :
-
Data – Size
-
hal_status_t
HAL_PCD_SetEndpointTransmit
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
,
uint8_t
*
p_buffer
,
uint32_t
size_byte
)
-
Send an amount of data.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
p_buffer – pointer to the transmission buffer
size_byte – amount of data to be sent
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_SetEndpointStall
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
)
-
Set a STALL condition over an endpoint.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_ClearEndpointStall
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
)
-
Clear a STALL condition over an endpoint.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_AbortEndpointTransfer
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
)
-
Abort an USB endpoint transaction.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_FlushEndpoint
(
const
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_addr
)
-
Flush an endpoint.
- Parameters :
-
hpcd – PCD handle
ep_addr – endpoint address
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RemoteWakeup_Start
(
const
hal_pcd_handle_t
*
hpcd
)
-
Start remote wakeup signalling.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RemoteWakeup_Stop
(
const
hal_pcd_handle_t
*
hpcd
)
-
Stop remote wakeup signalling.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_PMAConfig
(
hal_pcd_handle_t
*
hpcd
,
uint16_t
ep_addr
,
uint16_t
ep_kind
,
uint32_t
pma_address
)
-
Configure PMA for endpoints.
- Parameters :
-
hpcd – Device instance
ep_addr – endpoint address
ep_kind – endpoint Kind HAL_PCD_SNG_BUF: Single Buffer used HAL_PCD_DBL_BUF: Double Buffer used
pma_address – endpoint buffer address in The PMA: In case of single buffer endpoint this parameter is 16-bit value providing the address of endpoint buffer in PMA. In case of double buffer endpoint this parameter is a 32-bit value providing the endpoint buffer 0 address in the LSB part of 32-bit value and endpoint buffer 1 address in the MSB part of 32-bit value.
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_Start
(
hal_pcd_handle_t
*
hpcd
)
Peripheral State functions ¶
- group PCD_Exported_Functions_Group5
-
Functions
-
hal_pcd_state_t
HAL_PCD_GetState
(
const
hal_pcd_handle_t
*
hpcd
)
¶
-
Return the PCD handle state.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – state
-
hal_pcd_state_t
HAL_PCD_GetState
(
const
hal_pcd_handle_t
*
hpcd
)
¶
- group PCD_Exported_Functions_Group5
-
Functions
-
hal_pcd_state_t
HAL_PCD_GetState
(
const
hal_pcd_handle_t
*
hpcd
)
-
Return the PCD handle state.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – state
-
hal_pcd_state_t
HAL_PCD_GetState
(
const
hal_pcd_handle_t
*
hpcd
)
- group PCD_Exported_Functions_Group5
-
Functions
-
hal_pcd_state_t
HAL_PCD_GetState
(
const
hal_pcd_handle_t
*
hpcd
)
-
Return the PCD handle state.
- Parameters :
-
hpcd – PCD handle
- Return values :
-
HAL – state
-
hal_pcd_state_t
HAL_PCD_GetState
(
const
hal_pcd_handle_t
*
hpcd
)
IRQ handling functions ¶
- group PCD_Exported_Functions_Group6
-
Functions
-
void
HAL_PCD_IRQHandler
(
hal_pcd_handle_t
*
hpcd
)
¶
-
Dispatch the PCD interrupt request.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_DRD_IRQHandler
(
hal_pcd_handle_t
*
hpcd
)
¶
-
Handle the USB DRD FS interrupt request.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_IRQHandler
(
hal_pcd_handle_t
*
hpcd
)
¶
- group PCD_Exported_Functions_Group6
-
Functions
-
void
HAL_PCD_IRQHandler
(
hal_pcd_handle_t
*
hpcd
)
-
Dispatch the PCD interrupt request.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_DRD_IRQHandler
(
hal_pcd_handle_t
*
hpcd
)
-
Handle the USB DRD FS interrupt request.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_IRQHandler
(
hal_pcd_handle_t
*
hpcd
)
- group PCD_Exported_Functions_Group6
-
Functions
-
void
HAL_PCD_IRQHandler
(
hal_pcd_handle_t
*
hpcd
)
-
Dispatch the PCD interrupt request.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_DRD_IRQHandler
(
hal_pcd_handle_t
*
hpcd
)
-
Handle the USB DRD FS interrupt request.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_IRQHandler
(
hal_pcd_handle_t
*
hpcd
)
Default Callbacks functions ¶
- group PCD_Exported_Functions_Group7
-
Functions
-
void
HAL_PCD_LpmCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_lpm_active_status_t
lpm_status
)
¶
-
Send LPM (low Power Management) active status to user layer callback.
- Parameters :
-
hpcd – PCD handle
lpm_status – LPM active status
-
void
HAL_PCD_BcdCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_bcd_port_type_t
port_type
)
¶
-
Send BatteryCharging port type to user layer callback.
- Parameters :
-
hpcd – PCD handle
port_type – port type
-
void
HAL_PCD_DataOutStageCallback
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_num
)
¶
-
Data OUT stage callback.
- Parameters :
-
hpcd – PCD handle
ep_num – endpoint number
-
void
HAL_PCD_DataInStageCallback
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_num
)
¶
-
Data IN stage callback.
- Parameters :
-
hpcd – PCD handle
ep_num – endpoint number
-
void
HAL_PCD_SetupStageCallback
(
hal_pcd_handle_t
*
hpcd
)
¶
-
Setup stage callback.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_SofCallback
(
hal_pcd_handle_t
*
hpcd
)
¶
-
USB Start Of Frame callback.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_ResetCallback
(
hal_pcd_handle_t
*
hpcd
)
¶
-
USB Reset callback.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_SuspendCallback
(
hal_pcd_handle_t
*
hpcd
)
¶
-
Suspend event callback.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_ResumeCallback
(
hal_pcd_handle_t
*
hpcd
)
¶
-
Resume event callback.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_ISOOUTIncompleteCallback
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_num
)
¶
-
Incomplete ISO OUT callback.
- Parameters :
-
hpcd – PCD handle
ep_num – endpoint number
-
void
HAL_PCD_ISOINIncompleteCallback
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_num
)
¶
-
Incomplete ISO IN callback.
- Parameters :
-
hpcd – PCD handle
ep_num – endpoint number
-
void
HAL_PCD_ConnectCallback
(
hal_pcd_handle_t
*
hpcd
)
¶
-
Connection event callback.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_DisconnectCallback
(
hal_pcd_handle_t
*
hpcd
)
¶
-
Disconnection event callback.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_ErrorCallback
(
hal_pcd_handle_t
*
hpcd
)
¶
-
PCD Error callback.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_EndpointAbortTransferCallback
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_num
)
¶
-
PCD Endpoint Abort Transfer callback.
- Parameters :
-
hpcd – PCD handle
ep_num – endpoint number
-
void
HAL_PCD_LpmCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_lpm_active_status_t
lpm_status
)
¶
- group PCD_Exported_Functions_Group7
-
Functions
-
void
HAL_PCD_LpmCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_lpm_active_status_t
lpm_status
)
-
Send LPM (low Power Management) active status to user layer callback.
- Parameters :
-
hpcd – PCD handle
lpm_status – LPM active status
-
void
HAL_PCD_BcdCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_bcd_port_type_t
port_type
)
-
Send BatteryCharging port type to user layer callback.
- Parameters :
-
hpcd – PCD handle
port_type – port type
-
void
HAL_PCD_DataOutStageCallback
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_num
)
-
Data OUT stage callback.
- Parameters :
-
hpcd – PCD handle
ep_num – endpoint number
-
void
HAL_PCD_DataInStageCallback
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_num
)
-
Data IN stage callback.
- Parameters :
-
hpcd – PCD handle
ep_num – endpoint number
-
void
HAL_PCD_SetupStageCallback
(
hal_pcd_handle_t
*
hpcd
)
-
Setup stage callback.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_SofCallback
(
hal_pcd_handle_t
*
hpcd
)
-
USB Start Of Frame callback.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_ResetCallback
(
hal_pcd_handle_t
*
hpcd
)
-
USB Reset callback.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_SuspendCallback
(
hal_pcd_handle_t
*
hpcd
)
-
Suspend event callback.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_ResumeCallback
(
hal_pcd_handle_t
*
hpcd
)
-
Resume event callback.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_ISOOUTIncompleteCallback
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_num
)
-
Incomplete ISO OUT callback.
- Parameters :
-
hpcd – PCD handle
ep_num – endpoint number
-
void
HAL_PCD_ISOINIncompleteCallback
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_num
)
-
Incomplete ISO IN callback.
- Parameters :
-
hpcd – PCD handle
ep_num – endpoint number
-
void
HAL_PCD_ConnectCallback
(
hal_pcd_handle_t
*
hpcd
)
-
Connection event callback.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_DisconnectCallback
(
hal_pcd_handle_t
*
hpcd
)
-
Disconnection event callback.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_ErrorCallback
(
hal_pcd_handle_t
*
hpcd
)
-
PCD Error callback.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_EndpointAbortTransferCallback
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_num
)
-
PCD Endpoint Abort Transfer callback.
- Parameters :
-
hpcd – PCD handle
ep_num – endpoint number
-
void
HAL_PCD_LpmCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_lpm_active_status_t
lpm_status
)
- group PCD_Exported_Functions_Group7
-
Functions
-
void
HAL_PCD_LpmCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_lpm_active_status_t
lpm_status
)
-
Send LPM (low Power Management) active status to user layer callback.
- Parameters :
-
hpcd – PCD handle
lpm_status – LPM active status
-
void
HAL_PCD_BcdCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_bcd_port_type_t
port_type
)
-
Send BatteryCharging port type to user layer callback.
- Parameters :
-
hpcd – PCD handle
port_type – port type
-
void
HAL_PCD_DataOutStageCallback
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_num
)
-
Data OUT stage callback.
- Parameters :
-
hpcd – PCD handle
ep_num – endpoint number
-
void
HAL_PCD_DataInStageCallback
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_num
)
-
Data IN stage callback.
- Parameters :
-
hpcd – PCD handle
ep_num – endpoint number
-
void
HAL_PCD_SetupStageCallback
(
hal_pcd_handle_t
*
hpcd
)
-
Setup stage callback.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_SofCallback
(
hal_pcd_handle_t
*
hpcd
)
-
USB Start Of Frame callback.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_ResetCallback
(
hal_pcd_handle_t
*
hpcd
)
-
USB Reset callback.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_SuspendCallback
(
hal_pcd_handle_t
*
hpcd
)
-
Suspend event callback.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_ResumeCallback
(
hal_pcd_handle_t
*
hpcd
)
-
Resume event callback.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_ISOOUTIncompleteCallback
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_num
)
-
Incomplete ISO OUT callback.
- Parameters :
-
hpcd – PCD handle
ep_num – endpoint number
-
void
HAL_PCD_ISOINIncompleteCallback
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_num
)
-
Incomplete ISO IN callback.
- Parameters :
-
hpcd – PCD handle
ep_num – endpoint number
-
void
HAL_PCD_ConnectCallback
(
hal_pcd_handle_t
*
hpcd
)
-
Connection event callback.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_DisconnectCallback
(
hal_pcd_handle_t
*
hpcd
)
-
Disconnection event callback.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_ErrorCallback
(
hal_pcd_handle_t
*
hpcd
)
-
PCD Error callback.
- Parameters :
-
hpcd – PCD handle
-
void
HAL_PCD_EndpointAbortTransferCallback
(
hal_pcd_handle_t
*
hpcd
,
uint8_t
ep_num
)
-
PCD Endpoint Abort Transfer callback.
- Parameters :
-
hpcd – PCD handle
ep_num – endpoint number
-
void
HAL_PCD_LpmCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_lpm_active_status_t
lpm_status
)
Register Callbacks functions ¶
- group PCD_Exported_Functions_Group8
-
Functions
-
hal_status_t
HAL_PCD_RegisterSofCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
¶
-
Register USB PCD SOF callback To be used instead of the weak predefined callback.
- Parameters :
-
hpcd – USB PCD handle
p_callback – pointer to the SOF callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterSetupCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
¶
-
Register a USB PCD Setup callback To be used instead of the weak predefined callback.
- Parameters :
-
hpcd – USB PCD handle
p_callback – pointer to the Setup callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterResetCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
¶
-
Register a USB PCD Reset callback To be used instead of the weak predefined callback.
- Parameters :
-
hpcd – USB PCD handle
p_callback – pointer to the Reset callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterSuspendCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
¶
-
Register a USB PCD Suspend callback To be used instead of the weak predefined callback.
- Parameters :
-
hpcd – USB PCD handle
p_callback – pointer to the Suspend callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterResumeCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
¶
-
Register a USB PCD Resume callback To be used instead of the weak predefined callback.
- Parameters :
-
hpcd – USB PCD handle
p_callback – pointer to the Resume callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterConnectCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
¶
-
Register a USB PCD Connect callback To be used instead of the weak predefined callback.
- Parameters :
-
hpcd – USB PCD handle
p_callback – pointer to the Connect callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterDisconnectCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
¶
-
Register a USB PCD Disconnect callback To be used instead of the weak predefined callback.
- Parameters :
-
hpcd – USB PCD handle
p_callback – pointer to the Disconnect callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterDataOutStageCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_data_cb_t
p_callback
)
¶
-
Register USB PCD Data OUT Stage callback To be used instead of the weak HAL_PCD_DataOutStageCallback() predefined callback.
- Parameters :
-
hpcd – PCD handle
p_callback – pointer to the USB PCD Data OUT Stage callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterDataInStageCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_data_cb_t
p_callback
)
¶
-
Register USB PCD Data IN Stage callback To be used instead of the weak HAL_PCD_DataInStageCallback() predefined callback.
- Parameters :
-
hpcd – PCD handle
p_callback – pointer to the USB PCD Data IN Stage callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterIsoOutIncpltCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_iso_cb_t
p_callback
)
¶
-
Register USB PCD Iso OUT incomplete callback To be used instead of the weak HAL_PCD_ISOOUTIncompleteCallback() predefined callback.
- Parameters :
-
hpcd – PCD handle
p_callback – pointer to the USB PCD Iso OUT incomplete callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterIsoInIncpltCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_iso_cb_t
p_callback
)
¶
-
Register USB PCD Iso IN incomplete callback To be used instead of the weak HAL_PCD_ISOINIncompleteCallback() predefined callback.
- Parameters :
-
hpcd – PCD handle
p_callback – pointer to the USB PCD Iso IN incomplete callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterErrorCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
¶
-
Register USB PCD Error callback To be used instead of the weak HAL_PCD_ErrorCallback() predefined callback.
- Parameters :
-
hpcd – PCD handle
p_callback – pointer to the USB PCD Error callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterEndpointAbortTransferCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_data_cb_t
p_callback
)
¶
-
Register USB PCD Endpoint Abort Transfer callback To be used instead of the weak HAL_PCD_EndpointAbortTransferCallback() predefined callback.
- Parameters :
-
hpcd – PCD handle
p_callback – pointer to the USB PCD Endpoint Abort Transfer callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterBcdCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_bcd_cb_t
p_callback
)
¶
-
Register USB PCD BCD callback To be used instead of the weak HAL_PCD_BcdCallback() predefined callback.
- Parameters :
-
hpcd – PCD handle
p_callback – pointer to the USB PCD BCD callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterLpmCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_lpm_cb_t
p_callback
)
¶
-
Register USB PCD LPM callback To be used instead of the weak HAL_PCD_LpmCallback() predefined callback.
- Parameters :
-
hpcd – PCD handle
p_callback – pointer to the USB PCD LPM callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterSofCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
¶
- group PCD_Exported_Functions_Group8
-
Functions
-
hal_status_t
HAL_PCD_RegisterSofCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
-
Register USB PCD SOF callback To be used instead of the weak predefined callback.
- Parameters :
-
hpcd – USB PCD handle
p_callback – pointer to the SOF callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterSetupCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
-
Register a USB PCD Setup callback To be used instead of the weak predefined callback.
- Parameters :
-
hpcd – USB PCD handle
p_callback – pointer to the Setup callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterResetCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
-
Register a USB PCD Reset callback To be used instead of the weak predefined callback.
- Parameters :
-
hpcd – USB PCD handle
p_callback – pointer to the Reset callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterSuspendCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
-
Register a USB PCD Suspend callback To be used instead of the weak predefined callback.
- Parameters :
-
hpcd – USB PCD handle
p_callback – pointer to the Suspend callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterResumeCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
-
Register a USB PCD Resume callback To be used instead of the weak predefined callback.
- Parameters :
-
hpcd – USB PCD handle
p_callback – pointer to the Resume callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterConnectCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
-
Register a USB PCD Connect callback To be used instead of the weak predefined callback.
- Parameters :
-
hpcd – USB PCD handle
p_callback – pointer to the Connect callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterDisconnectCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
-
Register a USB PCD Disconnect callback To be used instead of the weak predefined callback.
- Parameters :
-
hpcd – USB PCD handle
p_callback – pointer to the Disconnect callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterDataOutStageCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_data_cb_t
p_callback
)
-
Register USB PCD Data OUT Stage callback To be used instead of the weak HAL_PCD_DataOutStageCallback() predefined callback.
- Parameters :
-
hpcd – PCD handle
p_callback – pointer to the USB PCD Data OUT Stage callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterDataInStageCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_data_cb_t
p_callback
)
-
Register USB PCD Data IN Stage callback To be used instead of the weak HAL_PCD_DataInStageCallback() predefined callback.
- Parameters :
-
hpcd – PCD handle
p_callback – pointer to the USB PCD Data IN Stage callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterIsoOutIncpltCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_iso_cb_t
p_callback
)
-
Register USB PCD Iso OUT incomplete callback To be used instead of the weak HAL_PCD_ISOOUTIncompleteCallback() predefined callback.
- Parameters :
-
hpcd – PCD handle
p_callback – pointer to the USB PCD Iso OUT incomplete callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterIsoInIncpltCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_iso_cb_t
p_callback
)
-
Register USB PCD Iso IN incomplete callback To be used instead of the weak HAL_PCD_ISOINIncompleteCallback() predefined callback.
- Parameters :
-
hpcd – PCD handle
p_callback – pointer to the USB PCD Iso IN incomplete callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterErrorCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
-
Register USB PCD Error callback To be used instead of the weak HAL_PCD_ErrorCallback() predefined callback.
- Parameters :
-
hpcd – PCD handle
p_callback – pointer to the USB PCD Error callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterEndpointAbortTransferCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_data_cb_t
p_callback
)
-
Register USB PCD Endpoint Abort Transfer callback To be used instead of the weak HAL_PCD_EndpointAbortTransferCallback() predefined callback.
- Parameters :
-
hpcd – PCD handle
p_callback – pointer to the USB PCD Endpoint Abort Transfer callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterBcdCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_bcd_cb_t
p_callback
)
-
Register USB PCD BCD callback To be used instead of the weak HAL_PCD_BcdCallback() predefined callback.
- Parameters :
-
hpcd – PCD handle
p_callback – pointer to the USB PCD BCD callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterLpmCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_lpm_cb_t
p_callback
)
-
Register USB PCD LPM callback To be used instead of the weak HAL_PCD_LpmCallback() predefined callback.
- Parameters :
-
hpcd – PCD handle
p_callback – pointer to the USB PCD LPM callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterSofCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
- group PCD_Exported_Functions_Group8
-
Functions
-
hal_status_t
HAL_PCD_RegisterSofCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
-
Register USB PCD SOF callback To be used instead of the weak predefined callback.
- Parameters :
-
hpcd – USB PCD handle
p_callback – pointer to the SOF callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterSetupCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
-
Register a USB PCD Setup callback To be used instead of the weak predefined callback.
- Parameters :
-
hpcd – USB PCD handle
p_callback – pointer to the Setup callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterResetCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
-
Register a USB PCD Reset callback To be used instead of the weak predefined callback.
- Parameters :
-
hpcd – USB PCD handle
p_callback – pointer to the Reset callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterSuspendCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
-
Register a USB PCD Suspend callback To be used instead of the weak predefined callback.
- Parameters :
-
hpcd – USB PCD handle
p_callback – pointer to the Suspend callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterResumeCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
-
Register a USB PCD Resume callback To be used instead of the weak predefined callback.
- Parameters :
-
hpcd – USB PCD handle
p_callback – pointer to the Resume callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterConnectCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
-
Register a USB PCD Connect callback To be used instead of the weak predefined callback.
- Parameters :
-
hpcd – USB PCD handle
p_callback – pointer to the Connect callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterDisconnectCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
-
Register a USB PCD Disconnect callback To be used instead of the weak predefined callback.
- Parameters :
-
hpcd – USB PCD handle
p_callback – pointer to the Disconnect callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterDataOutStageCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_data_cb_t
p_callback
)
-
Register USB PCD Data OUT Stage callback To be used instead of the weak HAL_PCD_DataOutStageCallback() predefined callback.
- Parameters :
-
hpcd – PCD handle
p_callback – pointer to the USB PCD Data OUT Stage callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterDataInStageCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_data_cb_t
p_callback
)
-
Register USB PCD Data IN Stage callback To be used instead of the weak HAL_PCD_DataInStageCallback() predefined callback.
- Parameters :
-
hpcd – PCD handle
p_callback – pointer to the USB PCD Data IN Stage callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterIsoOutIncpltCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_iso_cb_t
p_callback
)
-
Register USB PCD Iso OUT incomplete callback To be used instead of the weak HAL_PCD_ISOOUTIncompleteCallback() predefined callback.
- Parameters :
-
hpcd – PCD handle
p_callback – pointer to the USB PCD Iso OUT incomplete callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterIsoInIncpltCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_iso_cb_t
p_callback
)
-
Register USB PCD Iso IN incomplete callback To be used instead of the weak HAL_PCD_ISOINIncompleteCallback() predefined callback.
- Parameters :
-
hpcd – PCD handle
p_callback – pointer to the USB PCD Iso IN incomplete callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterErrorCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)
-
Register USB PCD Error callback To be used instead of the weak HAL_PCD_ErrorCallback() predefined callback.
- Parameters :
-
hpcd – PCD handle
p_callback – pointer to the USB PCD Error callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterEndpointAbortTransferCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_data_cb_t
p_callback
)
-
Register USB PCD Endpoint Abort Transfer callback To be used instead of the weak HAL_PCD_EndpointAbortTransferCallback() predefined callback.
- Parameters :
-
hpcd – PCD handle
p_callback – pointer to the USB PCD Endpoint Abort Transfer callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterBcdCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_bcd_cb_t
p_callback
)
-
Register USB PCD BCD callback To be used instead of the weak HAL_PCD_BcdCallback() predefined callback.
- Parameters :
-
hpcd – PCD handle
p_callback – pointer to the USB PCD BCD callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterLpmCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_lpm_cb_t
p_callback
)
-
Register USB PCD LPM callback To be used instead of the weak HAL_PCD_LpmCallback() predefined callback.
- Parameters :
-
hpcd – PCD handle
p_callback – pointer to the USB PCD LPM callback function
- Return values :
-
HAL – status
-
hal_status_t
HAL_PCD_RegisterSofCallback
(
hal_pcd_handle_t
*
hpcd
,
hal_pcd_cb_t
p_callback
)